package com.lyz.dataStructure.algorithm.VIPKID2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 17:00
 * @Description:
 **/

import java.util.Arrays;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/3 17:00
 *@Description:
 **/
public class 寻找zero数组1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s =sc.nextLine();
        String[] st =s.replace(" ","").split(",");
        int[]  arr = new int[st.length];
        for(int i =0;i<arr.length;i++){
            arr[i] =Integer.parseInt(st[i]);
        }
        System.out.println(returnNum(arr));

    }

    public static  int returnNum(int[] arr){
        Arrays.sort(arr);
        int i =0;
        int j =arr.length-1;
        int count=0;
        while (i<j){
            if((arr[i]+arr[j])>0){
                j--;
            }else if((arr[i]+arr[j])<0){
                i++;
            }else {
                count++;
                i++;
                j--;
            }
        }
        return count;
        }

}
